# -*- coding: utf-8 -*-
import pandas as pd
if __name__ == '__main__':
    series = pd.Series(range(5), index=['a', 'b', 'c', 'd', 'e'])
    print series
    print "---------索引位置切片，不包含最后一个（左闭右开）----------"
    print series[1:3]
    print "-----------索引名称切片，包含最后一个（全闭合）----------------"
    print series['b':'d']
    print "-----------不连续索引-----------"
    print series[[0,2,4]]
    print series[['a','c']]
    print "--------条件筛选-------"
    series_boolen = series < 3
    print series_boolen
    print series[series_boolen]